home *** CD-ROM | disk | FTP | other *** search
/ PC Open 107 / PC Open 107 CD 1.bin / CD1 / INTERNET / Abilon / InstallAB.exe / Style / Terminal.xsl < prev   
Encoding:
Extensible Markup Language  |  2004-07-09  |  2.0 KB  |  53 lines

  1. <?xml version="1.0"?>
  2. <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
  3. <xsl:output method="xml" omit-xml-declaration="yes"/>
  4. <xsl:variable name="common-styles">
  5. <style type="text/css">
  6. html { border: 4px solid gray; }
  7. body { background-color: black; color: silver; font-size: 100%; font-family: Lucida Console, "Courier New", Courier, monospace; overflow: auto;    }
  8. div.title { font-size: 100%; font-weight: bold; border: 0px; padding: 5px 5px 5px 5px; text-align: left; }
  9. div.content { font: 120%;text-indent: 15px;margin: 10px 10px 10px 10px; border-bottom: 1px dotted silver; text-align: justify; }
  10. div.header,
  11. div.footer { color: gray; font-size: small; text-align: right; margin-top: 2px;}
  12. a { color: white;font-weight: bold;text-decoration: none; }
  13. a:hover { color: black;    background-color: white;text-decoration: none; }
  14. a img { border: 1px solid white; }
  15. a:hover img { border: 1px solid blue; }    
  16. </style>
  17. </xsl:variable>
  18.  
  19.  
  20. <xsl:template match="//record">
  21.     <html>
  22.     <head>
  23.         <title>News Item</title>
  24.         <xsl:copy-of select="$common-styles"/>
  25.     </head>
  26.     <body>
  27.         <div class="title">
  28.             <a href="{feed/link}"><xsl:value-of select="feed/title" disable-output-escaping="yes"/></a><br/>
  29.             <a href="{item/link}"><xsl:value-of select="item/title" disable-output-escaping="yes"/></a>
  30.         </div>
  31.         <div class="content">
  32.             <xsl:value-of select="item/content" disable-output-escaping="yes"/>
  33.         </div>
  34.         <div class="footer"><xsl:value-of select="item/published" disable-output-escaping="yes"/></div>
  35.  
  36.  
  37.         <div class="footer">
  38.         <xsl:if test="item/comments">
  39.             <xsl:variable name="commentlink" select="item/comments/@link"/>
  40.             <a href="{$commentlink}"><xsl:value-of select="item/comments/@text"/></a>
  41.         </xsl:if>            
  42.         <xsl:if test="item/reply">
  43.             <xsl:variable name="replylink" select="item/reply/@link"/>
  44.             <xsl:text> </xsl:text><a href="{$replylink}"><xsl:value-of select="item/reply/@text"/></a>
  45.         </xsl:if>            
  46.         </div>    
  47.  
  48.     </body>
  49.     </html>
  50. </xsl:template>
  51.  
  52. </xsl:stylesheet>
  53.